package com.example.demo.day.config.learn.design.responsibity.x1;

public class Member extends Leader {
    private String name;

    public Member(Leader leader) {
        super(leader);
        this.name = "成员";
    }

    public Member(Leader leader, String name) {
        super(leader);
        this.name = name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public int getLimit() {
        return 10;
    }

    @Override
    public boolean handleRequest(int money) {
        System.out.println(name + "花费" + money + "元,成员自行批复");
        return true;
    }
}
